package club.ximeng.javafxspringboot.config;

import de.felixroske.jfxsupport.SplashScreen;
import org.springframework.stereotype.Component;

/**
 * 配置启动首屏
 *
 * @author liu xm
 * @date 2022-02-17 9:51
 */
@Component
public class CustomSplashScreen extends SplashScreen {

    /**
     * 自定义启动画面是否可见
     *
     * @return true by default
     */
    @Override
    public boolean visible() {
        return true;
    }

    /**
     * 使用自定义启动图
     *
     * @return "/splash/javafx.png"
     */
    @Override
    public String getImagePath() {
        return "/static/images/splash_screen.png";
    }
}
